#pragma once
#include"cocos2d.h"
#include"Cannon.h"

class StarLayer :public cocos2d::Layer
{
public:
	StarLayer() {}
	~StarLayer() {}

	CREATE_FUNC(StarLayer);

	bool init();

	cocos2d::CCPoint loactionFromTouch(cocos2d::Touch* touch);
protected:
	void MoveStar(float dt);
	void CallButtonThreeBack(cocos2d::CCObject* sender);
	bool onTouchBegan(cocos2d::Touch* touch,cocos2d::Event* event);
	void onTouchMoved(cocos2d::Touch* touch, cocos2d::Event* event);
	void onTouchEnded(cocos2d::Touch* touch, cocos2d::Event* event);
	
private:
	cocos2d::CCSprite* m_star;
	cocos2d::CCSprite* m_triangle;
	Cannon* m_Cannon;
};